#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Length.h>

USING_MOCKCPP_NS USING_TESTNGPP_NS

FIXTURE(display)
{
    TEST(print 1 Mile)
    {
        Length length(5280, FEET);
        length.display();
    }
   
    TEST(print 1 Mile 1 Feet)
    {
        Length length(5281, FEET);
        length.display();
    }
    
    TEST(print 1 Mile 1 Yard 1 Feet)
    {
        Length length(5284, FEET);
        length.display();
    }
    
    TEST(print 1 Mile 2 Yard)
    {
        Length length(5286, FEET);
        length.display();
    }
};

FIXTURE(Length)
{
    TEST(1 MILE ==1760 YARD)
    {
        Length length1(1, MILE), length2(1760, YARD);
        ASSERT_TRUE(length1==length2);
    }

    TEST(1 MILE ==5280 FEET)
    {
        Length length1(1, MILE), length2(5280, FEET);
        ASSERT_TRUE(length1==length2);
    }

    TEST(1 YARD ==3 FEET)
    {
        Length length1(1, YARD), length2(3, FEET);
        ASSERT_TRUE(length1==length2);
    }

    TEST(1 MILE != 1761 YARD)
    {
        Length length1(1, MILE), length2(1761, YARD);
        ASSERT_FALSE(length1==length2);
    }

    TEST(1 MILE ==1000 YARD + 760 YARD)
    {
        Length length1(1, MILE), length2(1000, YARD), length3(760, YARD);
        ASSERT_TRUE(length1==(length2+length3));
    }
    
    TEST(1 MILE ==4000 FEET + 1280 FEET) 
    { 
        Length length1(1, MILE), length2(4000, FEET), length3(1280, FEET); 
        ASSERT_TRUE(length1==(length2+length3)); 
    } 
     
    TEST(1 MILE ==1758 YARD + 6 FEET) 
    { 
        Length length1(1, MILE), length2(1758, YARD), length3(6, FEET); 
        ASSERT_TRUE(length1==(length2+length3)); 
    } 
 
    TEST(1 MILE !=1000 YARD + 761 YARD) 
    { 
        Length length1(1, MILE), length2(1000, YARD), length3(761, YARD); 
        ASSERT_FALSE(length1==(length2+length3)); 
    } 

    TEST(1 MILE !=4000 FEET + 1281 FEET) 
    { 
        Length length1(1, MILE), length2(4000, FEET), length3(1281, FEET); 
        ASSERT_FALSE(length1==(length2+length3)); 
    } 
 
    TEST(1 MILE !=1758 YARD + 7 FEET) 
    { 
        Length length1(1, MILE), length2(1758, YARD), length3(7, FEET); 
        ASSERT_FALSE(length1==(length2+length3)); 
    } 
  
}; 



